<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-counter-edit" th:object="${counter}" autocomplete="off">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">生产线编号：</label>
            <div class="col-sm-8">
                <input id="code" name="code" th:field="*{code}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">累计数量：</label>
            <div class="col-sm-8">
                <input id="num" name="num" th:field="*{num}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">当前数量：</label>
            <div class="col-sm-8">
                <input id="num2" name="num2" th:field="*{num2}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">时间：</label>
            <div class="col-sm-8">
                <!--<input id="thisTime" name="thisTime" th:field="*{thiTimeStr}" class="form-control" type="text">-->
                <!--<input id="thisTime" name="thisTime" th:value="${#dates.format(counter.thisTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">-->
                <input type="text" class="form-control time-input" th:field="*{thiTimeStr}" id="select_datetime1" placeholder="创建时间" name="thisTime"/>
            </div>
        </div>

        <!--<li class="select-time">
            <label>创建时间： </label>
            <div class="input-group date" id="timePicker">
                <input type="text" class="form-control time-input" th:value="${#dates.format(counter.thisTime, 'yyyy-MM-dd HH:mm:ss')}" &lt;!&ndash;th:field="*{thisTime}&ndash;&gt;" id="thisTime" placeholder="时间"
                       name="thisTime"/>
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
        </li>-->
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "project/counter"
    $("#form-counter-edit").validate({
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    // $(function() {
    //     $('#timePicker').datepicker({
    //         format: 'yyyy-mm-dd hh:ii:ss',
    //         language: 'zh-CN',
    //         autoclose: true
    //     });
    // });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-counter-edit').serialize());
        }
    }
</script>
</body>
</html>

<!--<!DOCTYPE HTML>-->
<!--<html lang="zh" xmlns:th="http://www.thymeleaf.org">-->
<!--<meta charset="utf-8">-->
<!--<head th:include="include :: header">-->
<!--    &lt;!&ndash; 添加日期选择器CSS &ndash;&gt;-->
<!--    <link href="https://cdn.jsdelivr.net/npm/bootstrap-datepicker@1.9.0/dist/css/bootstrap-datepicker.min.css" rel="stylesheet">-->
<!--</head>-->
<!--<body class="white-bg">-->
<!--<div class="wrapper wrapper-content animated fadeInRight ibox-content">-->
<!--    <form class="form-horizontal m" id="form-counter-edit" th:object="${counter}" autocomplete="off">-->
<!--        <input id="id" name="id" th:field="*{id}" type="hidden">-->
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">生产线编号：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input id="code" name="code" th:field="*{code}" class="form-control" type="text">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">累计数量：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input id="num" name="num" th:field="*{num}" class="form-control" type="text">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">当前数量：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input id="num2" name="num2" th:field="*{num2}" class="form-control" type="text">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">时间：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <div class="input-group date" id="datetimepicker">-->
<!--                    <input id="thisTime" name="thisTime" th:field="*{thisTime}"-->
<!--                           class="form-control" type="text"-->
<!--                           th:value="${#dates.format(counter.thisTime, 'yyyy-M-d HH:mm:ss')}"-->
<!--                           placeholder="请选择时间">-->
<!--                    <span class="input-group-addon">-->
<!--                            <span class="glyphicon glyphicon-calendar"></span>-->
<!--                        </span>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--    </form>-->
<!--</div>-->
<!--<div th:include="include::footer"></div>-->
<!--&lt;!&ndash; 添加日期选择器JS &ndash;&gt;-->
<!--<script src="https://cdn.jsdelivr.net/npm/bootstrap-datepicker@1.9.0/dist/js/bootstrap-datepicker.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/bootstrap-datepicker@1.9.0/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script>-->
<!--<script type="text/javascript">-->
<!--    $(function() {-->
<!--        // 初始化时间选择器-->
<!--        $('#datetimepicker').datepicker({-->
<!--            format: 'yyyy-mm-dd hh:ii:ss',-->
<!--            language: 'zh-CN',-->
<!--            autoclose: true,-->
<!--            todayBtn: true,-->
<!--            todayHighlight: true-->
<!--        });-->

<!--        // 如果已有时间值，设置日期-->
<!--        var thisTime = $('#thisTime').val();-->
<!--        if(thisTime) {-->
<!--            $('#datetimepicker').datepicker('setDate', thisTime);-->
<!--        }-->
<!--    });-->

<!--    var prefix = ctx + "project/counter";-->
<!--    $("#form-counter-edit").validate({-->
<!--        rules:{-->
<!--            xxxx:{-->
<!--                required:true,-->
<!--            },-->
<!--        }-->
<!--    });-->

<!--    function submitHandler() {-->
<!--        if ($.validate.form()) {-->
<!--            $.operate.save(prefix + "/edit", $('#form-counter-edit').serialize());-->
<!--        }-->
<!--    }-->
<!--</script>-->
<!--</body>-->
<!--</html>-->
